import * as tslib_1 from "tslib";
import { observable, action } from "mobx";
import request from "../utils/request";
import * as api from "../api/api";
import { LoadHoc, loading } from "../hoc/loadHoc";
// 人才中心
let TalentStore = class TalentStore extends LoadHoc {
  constructor() {
    super(...arguments);
    /**
     * 人才库
     */
    this.allResumeInfo = {};
    /**
     * 人才库-详情
     */
    this.resumeInfo = {};
    /**
     *招聘信息
     */
    this.allRecruitInfo = {};
    /**
     * 招聘信息-详情
     */
    this.recruitInfo = {};
    /**
     * 获取专业类别 数据
     */
    this.allMajorCategory = {};
    /**
     * 获取职称 数据
     */
    this.allTechnicalTitle = {};
  }
  async getAllResumeInfo(params) {
    const { formProvinceId, formMajorCategoryId, formTechnicalTitleId, formTypeOfJob, pageIndex, pageSize, callback } = params;
    const allResumeInfo = await request(api.ApptalentCenterApiFetchParamCreactor.apptalentCenterGetAllResumeInfoAsync({
      formProvinceId,
      formMajorCategoryId,
      formTechnicalTitleId,
      formTypeOfJob,
      formSkipCount: (pageIndex - 1) * pageSize,
      formMaxResultCount: pageSize
    }));
    this.allResumeInfo = allResumeInfo;
    callback && callback(allResumeInfo);
  }
  async getResumeInfo(params) {
    const { formId, callback } = params;
    const resumeInfo = await request(api.ApptalentCenterApiFetchParamCreactor.apptalentCenterGetResumeInfoAsync({
      formId
    }));
    this.resumeInfo = resumeInfo;
    callback && callback(resumeInfo);
  }
  async getAllRecruitInfo(params) {
    const { formProvinceId, formCityId, formStreetId, formTypeOfJob, pageIndex, pageSize, callback } = params;
    const allRecruitInfo = await request(api.ApptalentCenterApiFetchParamCreactor.apptalentCenterGetAllRecruitInfoAsync({
      formProvinceId, formCityId, formStreetId, formTypeOfJob, formSkipCount: (pageIndex - 1) * pageSize,
      formMaxResultCount: pageSize
    }));
    this.allRecruitInfo = allRecruitInfo;
    callback && callback(allRecruitInfo);
  }
  async getRecruitInfo(params) {
    const { formId, callback } = params;
    const recruitInfo = await request(api.ApptalentCenterApiFetchParamCreactor.apptalentCenterGetRecruitInfoAsync({
      formId
    }));
    this.recruitInfo = recruitInfo;
    callback && callback(recruitInfo);
  }
  async getAllMajorCategory(params) {
    const { callback } = params;
    const allMajorCategory = await request(api.ApptalentCenterApiFetchParamCreactor.apptalentCenterGetAllMajorCategoryAsync({}));
    this.allMajorCategory = allMajorCategory;
    callback && callback(allMajorCategory);
  }
  async getAllTechnicalTitle(params) {
    const { callback } = params;
    const allTechnicalTitle = await request(api.ApptalentCenterApiFetchParamCreactor.apptalentCenterGetAllTechnicalTitleAsync({}));
    this.allTechnicalTitle = allTechnicalTitle;
    callback && callback(allTechnicalTitle);
  }
};
export { TalentStore as default };

tslib_1.__decorate([observable], TalentStore.prototype, "allResumeInfo", undefined);
tslib_1.__decorate([loading, action], TalentStore.prototype, "getAllResumeInfo", null);
tslib_1.__decorate([observable], TalentStore.prototype, "resumeInfo", undefined);
tslib_1.__decorate([loading, action], TalentStore.prototype, "getResumeInfo", null);
tslib_1.__decorate([observable], TalentStore.prototype, "allRecruitInfo", undefined);
tslib_1.__decorate([loading, action], TalentStore.prototype, "getAllRecruitInfo", null);
tslib_1.__decorate([observable], TalentStore.prototype, "recruitInfo", undefined);
tslib_1.__decorate([loading, action], TalentStore.prototype, "getRecruitInfo", null);
tslib_1.__decorate([observable], TalentStore.prototype, "allMajorCategory", undefined);
tslib_1.__decorate([loading, action], TalentStore.prototype, "getAllMajorCategory", null);
tslib_1.__decorate([observable], TalentStore.prototype, "allTechnicalTitle", undefined);
tslib_1.__decorate([loading, action], TalentStore.prototype, "getAllTechnicalTitle", null);